feat(proto): generate datafusion-proto Java classes at build time#9
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4.
Adds a Maven build pipeline that downloads
datafusion_common.protoanddatafusion.protofromapache/datafusionat a pinned tag (53.1.0, matchingnative/Cargo.toml) and generates Java classes from them via the Xolsticeprotobuf-maven-plugin. Generated classes ship inside the existingdatafusion-javajar — theorg.apache.datafusion.protobuf.*namespace fromdatafusion.proto, plusdatafusion_common.*fromdatafusion_common.proto.Also adds a bootstrap
CONTRIBUTING.mdwhose primary content is the DataFusion / protobuf schema version-sync recipe. Bumping DataFusion now requires updating three things together:native/Cargo.toml,pom.xml's<datafusion.version>, and the SHA-512 pins on the two downloads. The recipe documents the exact commands to do that.End-to-end functionality — Java code constructing a plan via these classes and executing it through
SessionContext— is tracked separately in #8.What's in this PR
pom.xml: two new properties (<datafusion.version>=53.1.0,<protobuf.version>=3.25.5),protobuf-javaruntime dep,os-maven-pluginbuild extension, twodownload-maven-pluginexecutions with SHA-512 pins, and Xolsticeprotobuf-maven-pluginfor codegen.src/test/java/org/apache/datafusion/proto/ProtoGenerationTest.java: smoke test instantiating a generated class.CONTRIBUTING.md: new file with the version-sync recipe.Not in this PR
~/.m2after that).